set null on foreign key deletion in laravel

104

set null on foreign key deletion in laravel -

$table->foreignId('forign_id')->nullable()->constrained("table_name")->cascadeOnUpdate()->nullOnDelete();

Comments

Submit
0 Comments